import java.io.*;

public class test8 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("Java_11_16\\count.txt"));
        String line;
        line = br.readLine();
        int count = line == null? 0:Integer.parseInt(line);
        if(count < 3){
            System.out.println("免费试用,还有"+(2-count)+"次可以用");
            count++;
        } else {
            System.out.println("免费次数已用完,请充钱");
        }

        BufferedWriter bw = new BufferedWriter(new FileWriter("Java_11_16\\count.txt"));
        bw.write(count+"");
        bw.close();
        br.close();
    }
}
